$(document).ready(function() {	
			var url = location.search;
					$.ajax({
						type: "post",
						url: "/photo/picDetails.do"+url,
						dataType: "json",
						success: function(data) {
							var watermarkPic = "<ul>";
							var thumbnailPic = "<ul>";
							$("#back").attr("href","/photo/pic-details.html"+url);
							$.each(data, function(i, n) {
								$('#writerId').text(n["photoWriterId"]);
								$('#greatCount1').text(n["photoPicGreatCount"]);
								$('#q2').val(n.photoPicTitle);
								$('#q3').val(n.photoPicCost);
								if (i==0) {
									thumbnailPic+= " <li class='on'><img src="+n["photoOriginalPicPath"]+ " width='50' height='50'><div class='bun_bg'></div>"
								} else {
									thumbnailPic+= " <li class=''><img src="+n["photoOriginalPicPath"]+ " width='50' height='50'><div class='bun_bg'></div>"
									watermarkPic+="<li><img src="+n["photoOriginalPicPath"]+"></li>";
								}
							});
							watermarkPic += "</ul>";
							thumbnailPic += "</ul>";
							$('#thumbnailPic').append(thumbnailPic);
							$('#watermarkPic').append(watermarkPic);	
						}
					});
			});